home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 May / CMCD0504.ISO / Software / Freeware / Programare / dspack / DSPACK231.exe / {app} / Demos / BCB6 / PlayWin / main.cpp next >
Encoding:
C/C++ Source or Header  |  2003-03-05  |  1.8 KB  |  59 lines

  1. //---------------------------------------------------------------------------
  2.  
  3. #include <vcl.h>
  4. #pragma hdrstop
  5.  
  6. #include "main.h"
  7. //---------------------------------------------------------------------------
  8. #pragma package(smart_init)
  9. #pragma link "DSPack"
  10. #pragma resource "*.dfm"
  11. TMainForm *MainForm;
  12. //---------------------------------------------------------------------------
  13. __fastcall TMainForm::TMainForm(TComponent* Owner)
  14.         : TForm(Owner)
  15. {
  16. }
  17. //---------------------------------------------------------------------------
  18. void __fastcall TMainForm::MenuOpenClick(TObject *Sender)
  19. {
  20.   if (OpenDialog->Execute()) {
  21.         FilterGraph->Active = FALSE;
  22.         FilterGraph->Active = TRUE;
  23.         FilterGraph->RenderFile(OpenDialog->FileName);
  24.         FilterGraph->Play();
  25.   }
  26. }
  27. //---------------------------------------------------------------------------
  28. void __fastcall TMainForm::FormCloseQuery(TObject *Sender, bool &CanClose)
  29. {
  30.   FilterGraph->Active = FALSE;
  31. }
  32. //---------------------------------------------------------------------------
  33.  
  34. void __fastcall TMainForm::VideoWindowDblClick(TObject *Sender)
  35. {
  36.   VideoWindow->FullScreen = !VideoWindow->FullScreen;
  37. }
  38. //---------------------------------------------------------------------------
  39.  
  40. void __fastcall TMainForm::tbPlayClick(TObject *Sender)
  41. {
  42.   FilterGraph->Play();
  43. }
  44. //---------------------------------------------------------------------------
  45.  
  46. void __fastcall TMainForm::tbPauseClick(TObject *Sender)
  47. {
  48.   FilterGraph->Pause();
  49. }
  50. //---------------------------------------------------------------------------
  51.  
  52. void __fastcall TMainForm::tbStopClick(TObject *Sender)
  53. {
  54.   FilterGraph->Stop();
  55. }
  56.  
  57. //---------------------------------------------------------------------------
  58.  
  59.